﻿using Client.ICommandNotify;
using Client.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Client.WorkLog
{
    public class WorklogDataViewModel : NotifyBase
    {
        /// <summary>
        /// 
        /// </summary>
        public WorklogDataViewModel(List<WorkLogDtl> GcjsbDtlCBMListSource)
        {
            this.GcjsbDtlCBMListSource = GcjsbDtlCBMListSource;
            GcjsbDtlSource = GcjsbDtlCBMListSource;
            SearchCommand = new Command(SearchCommandDoExecute, SearchCommandCanExecute);
            UpdateCbm = new Command(UpdateCbmDoExecute, UpdateCbmCanExecute);
        }

        private void SearchCommandDoExecute(object obj)
        {
           
        }

        private void UpdateCbmDoExecute(object obj)
        {
           
        }

        private bool UpdateCbmCanExecute()
        {
            return true;
        }

        private bool SearchCommandCanExecute()
        {
            return true;
        }

        public Command SearchCommand { get; set; }
        public Command UpdateCbm { get; set; }

        private string SearchText_;

        public string SearchText
        {
            get { return SearchText_; }
            set { SearchText_ = value; }
        }
        private List<WorkLogDtl> GcjsbDtlSource = new List<WorkLogDtl>();
        private List<WorkLogDtl> GcjsbDtlCBMListSource_;

        public List<WorkLogDtl> GcjsbDtlCBMListSource
        {
            get { return GcjsbDtlCBMListSource_; }
            set
            {
                GcjsbDtlCBMListSource_ = value;
                SetProperty(ref GcjsbDtlCBMListSource_, GcjsbDtlCBMListSource);
            }
        }
    }
}
